package com.dao;

import com.entity.GoodsReceiveInfo;

import org.apache.ibatis.annotations.Param;

import java.util.List;

public interface GoodsReceiveInfoDao {
  // 获取一条收获信息
  GoodsReceiveInfo selectAGoodsReceiveInfoById(@Param("grId") String grId);

  // 获取一个用户的所有收货信息
  List<GoodsReceiveInfo> selectGoodsReceiveInfo(@Param("userId") String userId);

  int updateGoodsReceiveInfo(
      @Param("grId") String grId,
      @Param("grName") String grName,
      @Param("grPhone") String grPhone,
      @Param("grProvinces") String grProvinces,
      @Param("grCity") String grCity,
      @Param("grPrefecture") String grPrefecture,
      @Param("grSpecificAddr") String grSpecificAddr,
      @Param("status") int status);

  int cancelDefault(@Param("userId") String userId);

  int changeStatus(@Param("grId") String grId, @Param("newStatus") int newStatus);

  int insertGoodsReceiveInfo(
      @Param("userId") String userId,
      @Param("grId") String grId,
      @Param("grName") String grName,
      @Param("grPhone") String grPhone,
      @Param("grProvinces") String grProvinces,
      @Param("grCity") String grCity,
      @Param("grPrefecture") String grPrefecture,
      @Param("grSpecificAddr") String grSpecificAddr,
      @Param("status") int status);
}
